package cn.rkylin.oms.order.dao;

import cn.rkylin.oms.order.vo.OrderExportVO;
import cn.rkylin.oms.order.vo.OrderVO;

import java.util.List;
import java.util.Map;

public interface IOrderDAO {

    /**
     * 创建
     * 
     * @param orderVO
     * @throws Exception
     */
    public int insert(OrderVO orderVO) throws Exception;

    /**
     * 更新
     *
     * @param orderVO
     * @throws Exception
     */
    public int update(OrderVO orderVO) throws Exception;
    
    public int updateOrderForConsign(OrderVO orderVO) throws Exception;
    
    /**
     * 按照主键检索
     *
     * @param orderVO
     * @throws Exception
     */
    public OrderVO findById(String id) throws Exception;
    
    public List<OrderVO> findOtherOrder(OrderVO vo) throws Exception;
    
    public List<OrderVO> findByTradeCode(OrderVO vo) throws Exception;

    /**
     * 获取系统订单售后信息 wangxing add
     *
     * @param orderId
     * @return
     * @throws Exception
     */
    public List<OrderVO> getOrderAftersaleInfo(String orderId) throws Exception;

    /**
     * 根据条件取得数量
     * @param params
     * @return
     * @throws Exception
     */
    public int selectCount(Map<String,Object> params) throws Exception;

    /**
     * 系统订单导出（商品信息）
     * @param orderVO
     * @return
     * @throws Exception
     */
    public List<OrderExportVO> exportSku(Map map) throws Exception;

    /**
     * getOngoingOrdersCountBySkuCode:获取进行中的单据的数量. <br/>
     *
     * @author zhanghao
     * @param paramMap
     * @return
     * @throws Exception 
     */
    public int getOngoingOrdersCountBySkuCode(Map paramMap) throws Exception;
}
